import vtkPolyData from "@kitware/vtk.js/Common/DataModel/PolyData";

// 边缘线的相关数据（尤其是边的类型）。
export class TEdge {
  polyData: vtkPolyData;
  points: number[] | undefined; // 点位坐标
  edgeIds: number[] | undefined; // 每条边对应的id
  edgeLineNums: number[] | undefined; // 每一条边对应的vtkCell下标范围，[1,2,3,...]，比如第一个edge对应的线范围就是0,1的cell。
  edgeTypes: number[] | undefined; // 边的类型，1自由边，2共享边，3内部边
  faceEdgeNodeMap: Map<any, any> | undefined; // 记录每个面包含的线段及线段所包含的顶点坐标，用于选取线

  constructor(
    polyData_ins: vtkPolyData,
    edgeIds_ins?: number[],
    edgeLineNums_ins?: number[],
    edgeTypes_ins?: number[],
    faceEdgeNodeMap_ins?: Map<any, any>,
    linePoints_ins?: number[]
  ) {
    this.polyData = polyData_ins;
    this.edgeIds = edgeIds_ins;
    this.edgeLineNums = edgeLineNums_ins;
    this.edgeTypes = edgeTypes_ins;
    this.faceEdgeNodeMap = faceEdgeNodeMap_ins;
    this.points = linePoints_ins;
  }
}
